
package LwJGL;

import org.lwjgl.opengl.GL11;
import static org.lwjgl.opengl.GL11.*;


/**
 * Cube.java
 * Created on May 4, 2014
 * Author Joe Porter
 */
public class Cube {
    float rotate;
   
    public void renderGL(){
       // GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);
        //glLoadIdentity();
        
        //glRotatef(rotate, 1f, 1f, 0);
        glColor3f(1f, 1f, 0f);
        glBegin(GL_QUADS);
            glVertex3f(-1f, -1f, 0f);
            glVertex3f(+1f, -1f, 0f);
            glVertex3f(+1f, +1f, 0f);
            glVertex3f(-1f, +1f, 0f);
            glColor3f(0, 1f, 0f);
            glVertex3f(-1f, -1f, 2f);
            glVertex3f(-1f, -1f, 0f);
            glVertex3f(-1f, +1f, 0f);
            glVertex3f(-1f, +1f, 2f);
            glColor3f(1f, 0, 0f);
            glVertex3f(+1f, -1f, 0f);
            glVertex3f(+1f, -1f, 2f);
            glVertex3f(+1f, +1f, 2f);
            glVertex3f(+1f, +1f, 0f);
            glColor3f(1f, 1f, 1f);
            glVertex3f(-1f, -1f, 2f);
            glVertex3f(+1f, -1f, 2f);
            glVertex3f(+1f, +1f, 2f);
            glVertex3f(-1f, +1f, 2f);
            glColor3f(1f, 0, 1f);
            glVertex3f(-1f, +1f, 0f);
            glVertex3f(+1f, +1f, 0f);
            glVertex3f(+1f, +1f, 2f);
            glVertex3f(-1f, +1f, 2f);
            glColor3f(0, 1f, 1f);
            glVertex3f(-1f, -1f, 0f);
            glVertex3f(+1f, -1f, 0f);
            glVertex3f(+1f, -1f, 2f);
            glVertex3f(-1f, -1f, 2f);
            
         glEnd();
         rotate+=1;
    }
}
